-- Writer : TuQN
-- Date : 11-1-2004
-- Input : 
-- Output :
-- Description : fnServerDate lay ngay thang hien tai tren may  chu

use BKAcc
go 

IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'spServerDate')
	BEGIN
		DROP Procedure  spServerDate
	END

GO

CREATE PROCEDURE spServerDate
	@ServerDate  DateTime OUTPUT
   AS
	SET @ServerDate = getdate()
GO
GRANT EXEC ON spServerDate TO PUBLIC
-- Thuc hien spServerDate
DECLARE @percent1 DateTime

EXECUTE   spServerDate  @ServerDate=@percent1 OUTPUT

Print CONVERT(CHAR(30), @percent1)